<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="container">
    <div class="top-nav">
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
        <span>5</span>
        <span>6</span>
        <span>7</span>
        <span>8</span>
    </div>
</div>
<style>
    .container{
        position: relative;
    }
    .top-nav{
        position: fixed;
        top: 0;
        width: 100%;
        text-align: center;
    }
    span{
        display: inline-block;
        width: 10%;
        height: 20px;
        background-color: #33c072;
        margin-right: 1%;
    }
</style>
</body>
</html>